import component from "element-plus/es/components/tree-select/src/tree-select-option.mjs";
import { createRouter, createWebHashHistory } from "vue-router";
const routes = [
  {
    path: "/",
    component: () => import("@/view/index"),
    meta: { title: "" },
    redirect: "/index",
    children: [
      //财务管理课程列表页面
      {
        path: "index",
        component: () => import("@/view/pages/index"),
      },
      //会员中心
      {
        path: "/evstore",
        component: () => import("@/view/pages/evstore"),
      },
      //帮助
      {
        path: "/helpCenter",
        component: () => import("@/view/pages/helpCenter"),
      },

      {
        path: "/evcapture",
        component: () => import("@/view/pages/evcapture"),
      },
      {
        path: "/productIndex",
        component: () => import("@/view/pages/productIndex"),
        redirect: "/productIndex/evcapture",
        children: [
          {
            path: "evcapture",
            component: () => import("@/view/pages/evcapture"),
          },
        ],
      },
    ],
  },
  { path: "/login", component: () => import("@/view/login/index") },
  {
    path: "/user",
    component: () => import("@/view/user"),
    redirect: "/user/personal",
    children: [
      {
        path: "personal",
        component: () => import("@/view/pages/personal"),
      },
      {
        path: "shopping",
        component: () => import("@/view/user/shopping"),
      },
      {
        path: "personalPay",
        component: () => import("@/view/user/personalPay"),
      },
    ],
  },
];
const router = createRouter({ history: createWebHashHistory(), routes });
export default router;
